#!/usr/bin/env node

const inquirer = require('inquirer') // 交互问答
const template = require('./template')
const version = require('./version')

version.checkNode('>= 12.0.0')
inquirer.prompt(
  {
    type: 'input',
    name: 'name',
    message: 'Project Name'
  }
)
.then(template.copy)
.then(template.fill)
.then(version.checkLatest)
.catch(console.error)
